import sys
sys.stdin=open("input.txt","r")
sys.stdout=open("output.txt","w")
n=input()
t=2*n
a=map(int,raw_input().split())
b=[(i+1,a[i]) for i in range(0,t)]
b=sorted(b, key=lambda d : d[1])
flag=1
for i in range(0,n):
    if b[2*i][1]!=b[2*i+1][1]:
        flag=0
        break
if flag==0:
    print -1
else:
    for i in range(0,n):
        print b[2*i][0],b[2*i+1][0]
    



